import { Key } from 'react'
import { KfTreeNode } from '@/utils/tree'

export interface XlFolderPageQueryParams extends Partial<any> {
  ids?: Key[]
  searchText?: string
  parentId?: number
}

export interface XlFolderTreeQueryParams {
  parentId?: Key
}

export interface XlFolder {
  id: Key
  parentId?: Key
  name?: string
  createTime?: string
  modifyTime?: string
  seq?: number
}

export interface XlFolder_Summary {
  //主键
  id?: Key
  //名称
  name?: string
  description?: string
}

export interface XlFolder_TreeNode extends XlFolder, KfTreeNode {
  id: Key
  parentsId?: string[]
  parentsName?: string[]
  children?: XlFolder_TreeNode[]
}

export interface XlFolder_Create {
  icon?: string
  title: string
  parentId: number
  seq: number
}

export interface XlFolder_Modify extends XlFolder_Create {
  id: Key
}

export interface XlFolder_Patch extends Partial<XlFolder_Create> {
  id: Key
}
